CREATE TABLE [dbo].[TTTIPO_OPER]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NOT NULL,
[DE_TIPO_OPER] [dbo].[TD_VC_050] NOT NULL,
[CO_GRUP_OPER] [dbo].[TD_VC_003] NOT NULL,
[TI_MOVI] [dbo].[TD_VC_001] NOT NULL,
[ST_CAJA] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TTTIPO_OP__ST_CA__4BC21919] DEFAULT ('N'),
[ST_BANC] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TTTIPO_OP__ST_BA__4DAA618B] DEFAULT ('N'),
[ST_CTAC] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TTTIPO_OP__ST_CT__4F92A9FD] DEFAULT ('N'),
[ST_CTAP] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TTTIPO_OP__ST_CT__517AF26F] DEFAULT ('N'),
[TI_SITU] [dbo].[TD_VC_003] NOT NULL,
[ST_DETA_DOCU] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_DE__53633AE1] DEFAULT ('N'),
[ST_REPO_CAJA] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_RE__554B8353] DEFAULT ('N'),
[ST_ENRE_OTRO] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_EN__5733CBC5] DEFAULT ('N'),
[ST_TRAN_BANC] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_TR__591C1437] DEFAULT ('N'),
[ST_TRAN_CAJA] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_TR__5B045CA9] DEFAULT ('N'),
[ST_AUXI_0001] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__5CECA51B] DEFAULT ('N'),
[ST_AUXI_0002] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__5ED4ED8D] DEFAULT ('N'),
[ST_AUXI_0003] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__60BD35FF] DEFAULT ('N'),
[ST_AUXI_0004] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__62A57E71] DEFAULT ('N'),
[ST_AUXI_0005] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__648DC6E3] DEFAULT ('N'),
[ST_AUXI_0006] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__66760F55] DEFAULT ('N'),
[ST_AUXI_0007] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__685E57C7] DEFAULT ('N'),
[ST_AUXI_0008] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__6A46A039] DEFAULT ('N'),
[ST_AUXI_0009] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__6C2EE8AB] DEFAULT ('N'),
[ST_AUXI_0010] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_AU__6E17311D] DEFAULT ('N'),
[ST_REEM_ENRE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_RE__6FFF798F] DEFAULT ('N'),
[ST_DETR_CALC] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTTIPO_OP__ST_DE__71E7C201] DEFAULT ('N'),
[CO_TIPO_PAGO] [dbo].[TD_VC_003] NULL,
[CO_SUBR] [dbo].[TD_VC_003] NULL,
[CO_MEPA] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTTIPO_OP__CO_US__73D00A73] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTTIPO_OP__FE_US__74C42EAC] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTTIPO_OP__CO_US__75B852E5] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTTIPO_OP__FE_US__76AC771E] DEFAULT (getdate()),
[ST_PRES_BANC] [dbo].[TD_VC_001_SINO] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__5DE0C954] CHECK NOT FOR REPLICATION (([ST_AUXI_0001]='N' OR [ST_AUXI_0001]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__5FC911C6] CHECK NOT FOR REPLICATION (([ST_AUXI_0002]='N' OR [ST_AUXI_0002]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__61B15A38] CHECK NOT FOR REPLICATION (([ST_AUXI_0003]='N' OR [ST_AUXI_0003]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__6399A2AA] CHECK NOT FOR REPLICATION (([ST_AUXI_0004]='N' OR [ST_AUXI_0004]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__6581EB1C] CHECK NOT FOR REPLICATION (([ST_AUXI_0005]='N' OR [ST_AUXI_0005]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__676A338E] CHECK NOT FOR REPLICATION (([ST_AUXI_0006]='N' OR [ST_AUXI_0006]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__69527C00] CHECK NOT FOR REPLICATION (([ST_AUXI_0007]='N' OR [ST_AUXI_0007]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__6B3AC472] CHECK NOT FOR REPLICATION (([ST_AUXI_0008]='N' OR [ST_AUXI_0008]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__6D230CE4] CHECK NOT FOR REPLICATION (([ST_AUXI_0009]='N' OR [ST_AUXI_0009]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_AU__6F0B5556] CHECK NOT FOR REPLICATION (([ST_AUXI_0010]='N' OR [ST_AUXI_0010]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_BA__4E9E85C4] CHECK NOT FOR REPLICATION (([ST_BANC]='N' OR [ST_BANC]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_CA__4CB63D52] CHECK NOT FOR REPLICATION (([ST_CAJA]='N' OR [ST_CAJA]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_CT__5086CE36] CHECK NOT FOR REPLICATION (([ST_CTAC]='N' OR [ST_CTAC]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_CT__526F16A8] CHECK NOT FOR REPLICATION (([ST_CTAP]='N' OR [ST_CTAP]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_DE__54575F1A] CHECK NOT FOR REPLICATION (([ST_DETA_DOCU]='N' OR [ST_DETA_DOCU]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_DE__72DBE63A] CHECK NOT FOR REPLICATION (([ST_DETR_CALC]='N' OR [ST_DETR_CALC]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_EN__5827EFFE] CHECK NOT FOR REPLICATION (([ST_ENRE_OTRO]='N' OR [ST_ENRE_OTRO]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_RE__563FA78C] CHECK NOT FOR REPLICATION (([ST_REPO_CAJA]='N' OR [ST_REPO_CAJA]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_RE__70F39DC8] CHECK NOT FOR REPLICATION (([ST_REEM_ENRE]='N' OR [ST_REEM_ENRE]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_TR__5A103870] CHECK NOT FOR REPLICATION (([ST_TRAN_BANC]='N' OR [ST_TRAN_BANC]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] WITH NOCHECK ADD CONSTRAINT [CK__TTTIPO_OP__ST_TR__5BF880E2] CHECK NOT FOR REPLICATION (([ST_TRAN_CAJA]='N' OR [ST_TRAN_CAJA]='S'))
GO
ALTER TABLE [dbo].[TTTIPO_OPER] ADD CONSTRAINT [PK__TTTIPO_O__9F5DF03A40C567B9] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_TIPO_OPER]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_OPER] ADD CONSTRAINT [FK__TTTIPO_OP__CO_EM__7C703D6C] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
ALTER TABLE [dbo].[TTTIPO_OPER] ADD CONSTRAINT [FK__TTTIPO_OPER__7B7C1933] FOREIGN KEY ([CO_EMPR], [CO_GRUP_OPER]) REFERENCES [dbo].[TTGRUP_OPER] ([CO_EMPR], [CO_GRUP_OPER])
GO
